﻿//------------------------------------------------------------------------------
// <copyright file="PepperService.svc.cs" company="Robert MacLean">
//      Copyright © Robert MacLean.  All Rights Reserved.
// </copyright>
//
//  Details on this see: http://pepper.codeplex.com
//  This code released under the terms of the 
//  Microsoft Public License  (MS-PL, http://opensource.org/licenses/ms-pl.html.)
//------------------------------------------------------------------------------

namespace Pepper
{
    using System;
    using System.Linq;
    using System.ServiceModel;
    using Pepper.Exceptions;

    public class PepperService : IPepperService
    {
        public Guid Login(string emailAddress, string passwordHash)
        {
            var v2 = new PepperService2();
            return v2.Login(emailAddress, passwordHash);
        }
        
        public Tuple<byte[], string> LoadSettings(Guid userId, string passwordHash)
        {
            var v2 = new PepperService2();
            return v2.LoadSettings(userId, passwordHash);
        }

        public void SaveSettings(Guid userId, string passwordHash, byte[] settings, string settingsHash)
        {
            var v2 = new PepperService2();
            v2.SaveSettings(userId, passwordHash, settings, settingsHash, false);           
        }
    }
}
